# Maintainer: Konstantin Gizdov <arch at kge dot pw>
# Maintainer: Baptiste Jonglez <baptiste--aur at jonglez dot org>
pkgname='radcli'
pkgver=1.3.0
pkgrel=1
pkgdesc='Client library for writing Radius clients in C or C++'
arch=('loong64' 'x86_64')
url='https://radcli.github.io/radcli/'
license=('BSD')
depends=('nettle' 'gnutls')
source=("https://github.com/${pkgname}/${pkgname}/releases/download/${pkgver}/${pkgname}-${pkgver}.tar.gz"{,.sig})
sha512sums=('1fd68a29c950248f89c15dafa4fc8bc94d1bae4a9170aa328a0336cf73577e505c630df17fcd0ed012ded66237cdeb06853f08194e56ba8c96910b252d41d85f'
            'SKIP')
validpgpkeys=('1F42418905D8206AA754CCDC29EE58B996865171'  # Nikos Mavrogiannopoulos <nmav@gnutls.org>
              '59FBB55CA7F3A8AB0C503773D81C4887F1679A65'  # Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
              '56EE7FA9E8173B19FE86268D763712747F343FA7') # Nikos Mavrogiannopoulos <nmav@redhat.com>
build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  ./configure \
    --prefix='/usr' \
    --sysconfdir='/etc'
  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install
  install -Dm644 COPYRIGHT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
